package f;

import java.io.File;

import v4.text.TextJmConfig;

public class D {
	
	public static void main(String[] args) {
		DirOp dop = new DirOp();
		boolean goon = true;
		while(goon) {
			String fd = FileOp.pleaseInput("待加密/解密的文件或目录：");
			boolean yn = FileOp.inputYesOrNo("y 加密, n 解密 ");
			File fdFile = new File(fd);
			if(yn) {
				boolean second = FileOp.inputYesOrNo("二级目录");
				if(second) {
					dop.setAdd(0, 0, TextJmConfig.r(8));
				}
				int ret = dop.add(fdFile);
				System.out.println("完成情况："+ret);
			}else {
				String to = FileOp.pleaseInput("解密到目录：");
				File toFile = new File(to);
				dop.backOne(fdFile, toFile);
				System.out.println("完成");
			}
			
			goon = FileOp.inputYesOrNo("继续");
		}
	}

}
